﻿package mortal.game.view.copy.towerCopy.win
{
    import com.gengine.global.*;
    import com.mui.utils.*;
    import flash.display.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;
    import mortal.game.view.copy.towerCopy.panel.*;
    import mortal.game.view.task.view.base.*;

    public class TowerCopyTaskView extends TaskViewBase
    {
        private static var _instance:TowerCopyTaskView;

        public function TowerCopyTaskView()
        {
            super(ResFileConst.tower);
            return;
        }// end function

        override public function layoutUI() : void
        {
            super.layoutUI();
            contentPanel = UICompomentPool.getUICompoment(TowerTaskInfoPanel) as TowerTaskInfoPanel;
            addChild(contentPanel);
            _judgeRec.height = 415;
            return;
        }// end function

        override public function refresh(param1:Boolean = false) : void
        {
            super.refresh(param1);
            if (!allowRefresh)
            {
                return;
            }
            contentPanel.refresh(param1);
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            contentPanel = contentPanel && contentPanel.dispose(param1) ? (null) : (null);
            return;
        }// end function

        override protected function CreateBg() : Bitmap
        {
            return UIFactory.bg(-25, -25, 254, 385, _bgSprite, ImagesConst.TaskTrack_Bg);
        }// end function

        override public function stageResize() : void
        {
            super.stageResize();
            x = Global.stage.stageWidth - 278;
            y = 160 + 20 * (Global.stage.stageHeight / 1000);
            updateJudgeRect();
            return;
        }// end function

        override protected function mouseOutModuleHandler() : void
        {
            return;
        }// end function

        override protected function mouseOverModuleHandler() : void
        {
            return;
        }// end function

        public static function get instance() : TowerCopyTaskView
        {
            if (!_instance)
            {
                _instance = new TowerCopyTaskView;
            }
            return _instance;
        }// end function

    }
}
